<{include file='../common/view_header.tpl'}>
<div class="main_view">
	<div class="biaoge">   
	<h2 class="wjtit"><{$question_info.question_name}></h2>
	<p class="wjbh" style='text-align:left;'><label>问卷编号：</label><{$question_info.identifier}></p>
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td>网点名称：</td>
		<td><span class="wjbh"><{$netquestion_info.network_name}></span></td>
		<td>网点编号：<br /></td>
		<td><span class="wjbh"><{$network_info.network_num}></span></td>
		<{if $up_network_info}>
                <td>所属分行：</td>
		<td><span class="wjbh"><{$up_network_info.network_name}></span></td>
		<td>分行编号：</td>
		<td><span class="wjbh"><{$up_network_info.network_num}></span></td>
                <{/if}>
	  </tr>
	 <{if $basic_list}>
          <{foreach $basic_list as $key => $val}>
	  <tr>
		<td colspan="2"><{$val.title}>:</td>
		<td colspan="5"><span class="wjbh"><{$answer_list[$val.subject_id].answer_desc}></span></td>
                <td><a href="javascript:;" onclick="basic(<{$netquestion_info.nq_id}>,<{$val.subject_id}>);">修改</a> </td>
	  </tr>
          <{/foreach}>
          <{/if}>
	</table>
        
        <{foreach $classify_list['list'][1] as $parent_key => $parent_val}>
           <!--一级--> 
        <{if $parent_val}>
        <p class="wjbh pt10"><label><strong><{$classify_list['all'][$parent_val]}></strong></label></p>
        <{/if}>
        
        <!--是否有二级-->
        <{foreach $classify_list['list'][2] as $second_key => $second_val}>
            <{if isset($classify_list['parent'][$parent_val]) && ($second_val|in_array:$classify_list['parent'][$parent_val])}>
            <p class="wjbh pt10"><label><strong><{$classify_list['all'][$second_val]}></strong></label></p>
            <{/if}>
            <{foreach $classify_list['list'][3] as $classify_key => $classify_val}>
            <{if isset($classify_list['parent'][$second_val]) && ($classify_val|in_array:$classify_list['parent'][$second_val])}>
        <div class="group" id="<{$classify_val}>">
	<p class="wjbh pt10"><label><strong><{$classify_list['all'][$classify_val]}></strong></label></p>
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td width="50%"><strong>指标</strong></td>
		<td width="5%"><strong>标准分</strong></td>
                <td width="4%"><strong>得分</strong></td>
                <td width="5%"><strong>选项</strong></td>
                <td width="5%"><strong>选项值</strong></td>
		<td width="18%"><strong>情景描述</strong></td>
                <td width="4%"><strong>附件</strong></td>
                <td width="4%"><strong>操作</strong></td>
	  </tr>
        <{if $subject_list[$classify_val]}>
          <{foreach $subject_list[$classify_val] as $subject_key => $subject_val}>
          <tr class="classify_<{$classify_val}>" data="<{if isset($answer_list[$subject_val.subject_id])&&($subject_val.standard_score!=$answer_list[$subject_val.subject_id].answer_score)}>show<{else}>hide<{/if}>">
		<td><p><{$subject_val.question_num}> <{$subject_val.title}></p><p><{$subject_val.content}></p></td>
		<td><{$subject_val.standard_score}></td>
                <td><span class="wjbh"><{$answer_list[$subject_val.subject_id].answer_score}></span></td>
                <td>
                    <{if isset($option_list[$subject_val.subject_id])}>
                    <{foreach $option_list[$subject_val.subject_id] as $option_key => $option_val}>
                        <{$option_key}>：<{$option_val}><br/>
                    <{/foreach}>
                    <{/if}>
                </td>
                <td><{if isset($answer_list[$subject_val.subject_id])}><{$answer_list[$subject_val.subject_id].answer_option}><{/if}></td>
		<td><{if isset($answer_list[$subject_val.subject_id])}><{$answer_list[$subject_val.subject_id].answer_desc}><{/if}></td>
                <td>
                    <{if isset($attach_list[$subject_val.subject_id])}>
                    <a href="/webadmin/netQuestion/attach?nq_id=<{$nq_id}>&subject_id=<{$subject_val.subject_id}>" target="_blank">附件</a>
                    <{/if}>
                </td>
                <td>
                    <a href="javascript:;" onclick="answer(<{$netquestion_info.nq_id}>,<{$subject_val.subject_id}>);">修改</a> 
                </td>
	  </tr>
          <{/foreach}>
          <{/if}>
	</table> 
        </div>
        <{/if}>
        <{/foreach}>
        <{/foreach}>
        <{/foreach}>
	</table>		
  </div>
</div>
<script>
 //回答每个问题
function answer(nq_id,subject_id){ 
    $.layer({
        type: 2,
        shadeClose: true,
        title:'修改网点对标信息',
        closeBtn: [0, true],
        shade:[0.5, '#000'],
        border: [10, 0.3, '#000'],
        offset: ['150px',''],
        area: ['540px', '400px'],
        iframe: {src: '/webadmin/netQuestion/answer?nq_id='+nq_id+'&subject_id='+subject_id}
    }); 
}
//修改基本信息
function basic(nq_id,subject_id){
    $.layer({
        type: 2,
        shadeClose: true,
        title:'修改网点对标基本信息',
        closeBtn: [0, true],
        shade:[0.5, '#000'],
        border: [10, 0.3, '#000'],
        offset: ['150px',''],
        area: ['340px', '300px'],
        iframe: {src: '/webadmin/netQuestion/basic?nq_id='+nq_id+'&subject_id='+subject_id}
    }); 
}
</script>
</script>
<{include file="../common/footer.tpl"}>